package com.wms.controller;

import com.wms.dto.ConfirmPickDto;
import com.wms.pojo.PageResult;
import com.wms.pojo.Result;
import com.wms.service.OutboundOrderDetailsService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/outboundOrderDetails")
@RequiredArgsConstructor
public class OutboundOrderDetailsController {

    private final OutboundOrderDetailsService detailsService;

    //条件查询，待拣货
    @GetMapping
    public Result queryPagePick(Integer page,Integer pageSize,Integer status,String invoiceCode,String customerName){
        PageResult pageResult = detailsService.queryPagePick(page,pageSize,status,invoiceCode,customerName);
        return Result.success(pageResult);
    }

    //确定拣货
    @PutMapping
    public Result updateById(@RequestBody ConfirmPickDto dto){
        detailsService.updatePickCount(dto);
        return Result.success();
    }
}
    